{% macro breadcrumbs(elements) %}

  {% set delimiter %}&nbsp;&gt; {% endset %}
  {% set indexpage %}true{% endset %}
  
  {% if indexpage=='true' %}
    <a href="/">Главная страница</a>{{ delimiter }}
  {% endif %}
  
  {% for el in elements %}
    <a href="{{ el.url }}">{{ el.title }}</a>{{ delimiter }}
  {% endfor %}
  
{% endmacro %}

{%  macro select(name, elements, selected) %}
{% set selected %}'{{selected}}'{% endset %}
<select name="{{ name }}">
    {% for el in elements %}
    {{ selected }}
    <option value="{{ el.id }}"{% if "'" ~ el.id ~ "'" == selected %} selected="selected"{% endif %}>{% for i in range(0,el.level) %}|&nbsp;{% endfor %}{{ el.title }}</option>
    {% endfor %}    
</select>
{% endmacro %}